A<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Register Page</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f4f4f4;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .register-container {
            background-color: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 500px;
        }
        .register-container h2 {
            text-align: center;
            color: #333;
        }
        .form-group, .input-group {
            margin-bottom: 20px;
        }
        .form-group label, .input-group label {
            display: block;
            margin-bottom: 5px;
            color: #666;
        }
        .form-group input, .input-group select, .input-group input {
            width: 100%;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box; /* Ensures padding doesn't affect width */
        }
        .form-group button {
            width: 100%;
            padding: 15px;
            border: none;
            border-radius: 4px;
            background-color: #5cb85c;
            color: white;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }
        .form-group button:hover {
            background-color: #4cae4c;
        }
        .switch-link {
            text-align: center;
            margin-top: 20px;
            font-size: 14px;
            color: #1a73e8;
            text-decoration: none;
        }
        .switch-link:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>

<div class="register-container">
    <h2>注册</h2>
    <form action="/register" method="post">
        <div class="form-group">
            <label for="username">账户:</label>
            <input type="text" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码:</label>
            <input type="password" id="password" name="password" required>
        </div>
        <div class="form-group">
            <label for="confirm-password">确认密码:</label>
            <input type="password" id="confirm-password" name="confirm-password" required>
        </div>
        <!-- 添加性别字段 -->
        <div class="input-group">
            <label for="registerGender">性别:</label>
            <select id="registerGender" name="gender" required>
                <option value="" disabled selected>请选择性别</option>
                <option value="male">男</option>
                <option value="female">女</option>
            </select>
        </div>

        <!-- 添加年龄字段 -->
        <div class="input-group">
            <label for="registerAge">年龄:</label>
            <input type="number" id="registerAge" name="age" required placeholder="请输入年龄" min="1" max="120">
        </div>
        <div class="form-group">
            <button type="submit">注册</button>
        </div>
    </form>
    <div class="switch-link">
        已经注册？<a href="login.html">登录这里</a>
    </div>
</div>

</body>
</html>